Week #18 is finally here. It´s been a long journey since january when we started Fab Academy 2024. This week I have to present my final project and make sure it works and does everything. So lets begin with the
last stop of our journey. Just remember it´s time to rest..... hahaha, no, it isn't is time to work, work, work!!! Come on, we can do it! So join me one last time and see what comes along and as always hoping for the
best.
This week assignmets are:
Group assignments:
None
Individual assignments:
Make a introduction image of the project, PNG
Make a 1 minute video that shows the making process of the project.
General Information
So we start the making process of my project. I'm going to show you step by step eveything required to finish my project. Remember i'm making a medical lamp that will have the next functions:
Leds will iluminate an acrylic figure.
It's going to measure heart beats and SPO2 in the blood, through a Max30102 sensor.
The measures will display in a screen and also will be visualize from internet.
I'm using a push button to change the intensity of the leds.
Components i'm using:
This are the components and pins i'm using en each one of them:
In this part I will detail how much i'll invest. A few details:
The tables show prices and total in local currency (Lempiras L.) and dollars ($)
I use a rate conversion of L. 24.68. Meaning $1.00 = L. 24.68
Work plan
In this section im´ going to add a work plan for my final project of how i'll be working week by week. The idea is to have a plan I can follow to manufacture my project.
Manufaturing process
A). Designing in SolidWorks
In this section i'll share with you the process of my design. Something important is why this desing, well, let me tell you a few things I consider:
I started designing my defining some measurements.
I had to make sure I get the right measures because this part is were my components will be.
I design:
Superior case
inferior case
Base of the PCB
Acrylic figure
I didn't desing the components, I downloaded them from GrabCad.com, this includes:
HC-SR04
Max30102
SSD1306 Oled display
Leds
Push button
A1. Superior and inferior case
I started with the front case, I think this is the hardest part because I have to make usre the components fit correctly in every space and doesn't have to be loose. This is a good oportunity to make changes in
case they are need it.
In this first images I define measurements.
Make an arc, I did this because it's easier to grab.
I extrude a few cm.
Apply Chaflan to avoid square edges.
In the next images you'll see that I started to design the spaces for each component.
I use the shell command to make an opening in the front case so I could create the inferior case.
Then I did the inferior case based on the superior case.
Apply Chaflan to avoid square edges.
In this last part I realize that I wasn't using the space properly.
So, I decide to eliminate the gap and arrange the spaces.
This way I had much more space to work.
A2. Acrylic figure
This part was a little tricky. I decide to do this using acrylic so I was going to use the laser cutting machine so what did this mean? Remember kerf? Yes, I got to consider kerf because this figure must be
assembled with the upper case.
I define some measures.
Extrude the part as much as the width of the acrylic.
I downloaded a medical logo that was related with medicine.
I did this beacuse if I put this as a .jpg file the lase cutting machine will take longer to engrave it.
The engraving process is simplified.
B). Programming time
This section is all about programming and I need to program the next components:
Max30102
Display oled SSD1306
Leds
What did I do in this part? Well let me tell you:
I use different libraries that help program the components correctly.
I tested every component separetely.
Use several codes to see how the component work.
Then I started to combine lines of code and of course testing it.
In the next sections i'm going to share parts of the code that I use for each component. Part of the code I got was from chatgpt, github (jotathebest) and other parts from the libraries examples I installed. This part
took several hours/days
B1). Libraries, pins and leds
This part of the code is to:
Define the libraries use for each component.
Define the correct pin (see were you connect the led)
Set the amount of leds we are going to light up.
Set the color you wish the leds will light up.
B2). Wi-Fi connection and MQTT
The next part of the code is for:
Wi-fi connection.
Define labels and variables for MQTT.
Set a message when the device can't connect to thw Wi-fi connection.
B3). Display oled SSD1306
In the next part of the code you see:
Variables will be print in arduino IDE.
Variables will print on the Oled SSD1306.
B4). Max30102 code
And for this part of the code takes the maeasures:
Heart beat
SPO2
C). 3D printing
Now that I made some changes in my design I'm going to printed in the 3D. I'm going to print 2 two cases (upper and lower) and the have to fit to make a good assemble. For this part I had to:
C1). Preparing to 3D print
Change the solidwork file to .stl extension.
Import to Prusa Slicer software.
Set support material were is needed.
And what we don´t like, wait a few hours. The approximate time for each printing case was:
Upper case: 7 hours and 27 minutes.
Lower case: 5 hours and 17 minutes.
C2). Is the final printing ok?
After the printing is done I made some test and I got to make sure of two things:
First one was that the two cases fit together perfectly.
Second one was to fit all the components into the case.
C3). 3D printing and final result
Here is a short video of the printing process:
D). Computer Aided design
Once I have ready the design of the acrylic figure, I proceed to use the Laser cutting machine and the acrylic sheet. So, what did I do in this part:
D1). Cutting process
Desing the acrylic figure in solidoworks.
Downloaded the logo and converted to .dxf file
Place it the acrylic figure using RdWorks (laser cutting machine software).
Make some adjustment in the siza of the logo so it can fit in the acrylic.
Test it to make sure it fits in the space I define in the superior case, remember kerf.
D2). Setting parameters
Then I was readt to use de laser cutting machine and set the speed and power parameters for the figure and logo. I set this parameters:
Acrylic figure:
Speed (mm/s): 12
MinPower (%)-1: 30
MaxPower (%)-1: 30
Medical logo:
Speed (mm/s): 350
MinPower (%)-1: 30
MaxPower (%)-1: 30
D3). Laser cutting machine working video and final result
D4). final Result
E). Time to wire
I reach the part were I have wire my project. At this point I have to make sure no just the components fit perfectly but to use wire with an appropriate length. Now, why is this important for my project? Well, let me
share with all of you some reasons:
For better organization.
Prevent from having loose cables.
For aesthetics.
Making sure everything goes into the right place.
E1). Preparing the wires.
In this process I had to prepare the wires I would be using. The idea is to make them of the appropriate length. This is what I did:
Measure the length the pin on the pcb to the pin of the component.
Once I make sure of the lenght, I cut the wire.
I strip both parts of the cable, not the connector part, but from were I cut them.
I had to make sure I strip enough of the wire so I could joint them.
And I got to make sure to cut enough so when I joint it it would be to short.
Once I strip one of the ends of each wire I had to insert a heat shrinkable before making a joint.
So, after this, I make a joint between the wires, using the strip ends.
Solder the joint.
Place the heat shrinkable in the joint.
Use the heat gun so the heat shrinkable could adjust to the wire and protect the joint.
The I test to check that there is continuity in the cable.
And finally test the length of the wire.
E2). Wiring time.
Now, for the next part I started to wire the MediLamp. Test if everything was exactly how is need it and the proceed to fit everything in the right place in the in the assembly part. Even though this part took
some time, the test look good and I was ready to assemble everything. In the picnic section i'm going to sepcify what problems I had and errors I made en each part of the project.
F). Testing
So, I decided to make one last test before assembling the final project. I want to check one last time that everything was working ok. I just want it to make sure that all the components, wiring, connections and
coding were working all together. This was kind a scary, but I had to do it. I share woth you a short video of the final test.
FYI:This test made me happy, I had everything ready for the assembling. So it was time to take a rest, hahaha naaaah!!! I had to continue and make sure everything was ready for my final presentation. I was still
missing the final slide and video. But at least with this test I had a relief..... but this relief wasn't for so long. Again, in the picnic section i'll share what happened.
G). Assembling time
This is the final part. The moment to make the final assemble was here. I had everything I need, components, cables, code and cases ready so that my final project could work and add a final result to the video I
was preparing for my final presentation. Here are the steps:
Fit the components into the superior case.
Add the code to the xiao.
Wire the components.
Make a test before closing.
Close both cases.
Insert the acrylic figure
Make the final test.
Testing section
In this section of the web page, i'll share the results I from the different test I made during the making process of the MediLamp. En each phase I had to make several test just to make sure everything will work by
itself and together with the other components. So lets start:
A). 3D - Printing
I begin with the 3D printing. I wanted to be sure if both cases fit together perfectly. So I decide to print MediLamp:
In a smaller scale.
Part of the case in normal scale.
Part of the superior case to verify if every component fit correctly.
B). Code and Leds
When the leds arrive, I test them and I try some examples of the Adafruit_NeoPixel library and a code from chatgpt. I wanted to see:
How they work
Colors
Intenisty
C). Acrylic design
It was time to cut the acrylic design and in here I had to consider kerf. So, dimensions are very important. I had a few details besides using polycarbonate instead of acrylic that I mentioned above. What
came up in this phase?:
The figure was a few mm too long. Also here I noticed that it had some burn spot, so I decided to modify the speed to a slower speed.
In a second chance, it was a few mm to short. The burn spots were not an issue anymore.
I broke one of the ends. Things happened.....
P.I.C.N.I.C section
Just as I did throughout the other 17 weeks of Fab Academy, in this section I will share every "p.i.c.n.i.c" errors I made during the process of buiding my project and specify the phase I was so you can have a better
undertanding. So, lets begin with this section.
A). Embedded coding
So one the parts that took some time to finish it was the coding part. As I work on it I try to make as much test as I could, making sure the code work properly. Coding "p.i.c.n.i.c" errors:
A1). Wrong pins in the code.
What happened?
Leds were not working, no leds turn on.
I forgot to change the pins to the correct one, now I can laugh but in that moment I had so much things in my mind that I didn't realize this part.
What did I do?
One of the test I made was to test the code with arduino, just to make sure it worked.
Uploaded the code several times.
Change the wires I was using.
Test the wires.
How did I fix it:
Make sure you set the right pins int he code.
A2). No results in the SSD1306.
What happened?
In this part I was trying to show the result in the display SSD1306 and the only thing showing was little dots.
Arduino IDE show correctly the resulting measurements.
What did I do?
One of the test I made was to test the code with arduino, just to make sure it worked.
Change the wires I was using.
Test the pins in the xiao, the pins int the SSD1306 and the wires.
I use another SSD1306 just to be sure.
How did I fix it:
I forgot part of the code: display.display
B). Computer Aided design
I thouth that in this part I wasn't going to have any problems, as a matter of fact I consider the easiest part of the entire project. But that was just a feeling. This were my Computer aided design "p.i.c.n.i.c" errors:
B1). Material I was using.
What happened?
As I did in my coding part, before the final cut I just made some test, just in case.
I set the parameter of speed and power to cut the figure and engrave the logo.
The final result I got was a burned part
What did I do?
Make a second test, the result was the same.
Modify parameters and nothing change.
How did I fix it:
Change the material beacause I wasn't using acrylic I was using PC, polycarbonate. This was so funny, I thought the acrylic got ruined.
C). Wiring and leds
This part took a few hours, it wasn't that hard but I had to make sure every wire had the lenth and worked correctly. This were my wiring and led "p.i.c.n.i.c" errors:
C1). Wires.
What happened?
So, in several times I forgot to insert the heat shrinkable and I just realize after I had solder the two wires.
Another thing that happened was that I burn the wire trying to heat the heat shrinkable.
What did I do?
With the heat shrinkable I try to be more careful, hahaha it didn't work for several more times.
In relation with burning, the solution was to not place the heat gun to close and lower its temperature.
How did I fix it:
Just focus on the steps and putting the material in sight so as not to forget anything.
Placing the heat gun further away and regulating just a bit the temperature.
C2). Leds.
What happened?
In the last test, before assembling, all the led were working, all 100 of them.
When I begun to assemble the project I decided to make a final test and it was good that I did it, becuase the leds were not working.
What did I do?
First thing was checking the code.
Then I use an example from the library Adafruit_NeoPixel.h, the basic example and nothing.
So, I decide to check continuity and that was the problem, the first led had the problem.
How did I fix it:
Once I had identify the led, I cut it.
Then re wired the second led.
Test the code, and it worked perfectly.
Final part
Files
In this part, i'm going to share with you the files I used for my final project.
I think this recomendation is one of the most important ones and I always mentioned how important is to document, document, document and don't wait until last minute, so do it as you go.
As documentation, compress images and videos as you go and make sure the formats are the required.
Get to know the materials, equipment and components.
This week is a good opportunity to make sure you have consider everything you need to build the project.
Don't be afraid to ask, it's important to ask other persons opinion, experience people of course.
Take your time in the design, don't rush because you have to think 3 or 4 steps ahead, specially in the details.
Make as many test as you can. Specially when you want to integrate components into a design. Something that helped me a lot was to test individually every component and then as I integrated them.
Making test helped me realize of some errors and fix them. Sometimes it wasn't easy but is better to see a smaller thing than as a whole.
Put yourself as the final user and analyze every detail.